package com.example.dto.request.pet;

import com.example.dto.request.group.InsertGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author Lexin Huang
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class PersonalPetRequestDTO {

    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9]{1,16}$",
            message = "宠物名称必须在 1-16个字符，支持中英文、数字",
            groups = {InsertGroup.class, ModifyPetProfileGroup.class})
    private
    String petName;

    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,10}$",
            message = "宠物品种必须在 2 - 10 个中文字符以内",
            groups = {InsertGroup.class, ModifyPetProfileGroup.class})
    private
    String petBreed;

    @Length(max = 255,
            message = "宠物介绍不能超过 255 个字符",
            groups = {InsertGroup.class, ModifyPetProfileGroup.class})
    private
    String petIntroduction;

    @NotNull(message = "请选择宠物是否公开!", groups = {InsertGroup.class, ModifyPetProfileGroup.class})
    Boolean overt;

    public interface ModifyPetProfileGroup {

    }

}
